import { CacheFinishStageMap, FinishStageList } from "../model/StageFinish";
import { defineStore } from "pinia";

const UseCacheFinishStageMap = defineStore("cacheFinishStageMap", {
  state() {
    const cacheFinishStageMap = new CacheFinishStageMap([], new Map<string, FinishStageList>(), []);
    return {
      cacheFinishStageMap: cacheFinishStageMap,
    };
  },
  actions: {
    setCacheFinishStageMap: function (cacheFinishStageMap: CacheFinishStageMap) {
      // console.log("surfaceSetting", surfaceSetting);
      // console.log('surfaceSetting',...surfaceSetting)
      this.getCacheFinishStageMap().setInfo(cacheFinishStageMap);
      // this.surfaceSetting.setInfo(...surfaceSetting);
      // this.setting = setting;
    },
    getCacheFinishStageMap: function (): CacheFinishStageMap {
      return this.cacheFinishStageMap;
    },
    // getTaskLogMap:function(timeStamp:number):CacheTaskLogMap{
    //
    //
    // },
    setCacheFinishStageFileList: function (cacheFinishStageFileList: Array<string>) {
      this.cacheFinishStageMap.cacheFinishStageFileList = cacheFinishStageFileList;
    },
    // save2:function(){
    //
    // },
  },
  getters: {},
});
export default UseCacheFinishStageMap;
